//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_mhqdeplnet.sqf"
#include "x_setup.sqf"

private ["_mhq", "_isdeployed", "_name", "_vside"];
PARAMS_2(_mhq,_isdeployed);
_name = GV(_mhq,GVAR(vec_name));
if (isNil "_name") exitWith {};
#ifdef __TT__
_vside = GV(_mhq,GVAR(side));
if (isNil "_vside" || {GVAR(player_side) != _vside}) exitWith {};
#endif
_m = GV(_mhq,GVAR(marker));
if (_isdeployed) then {
	(format [(localize "STR_DOM_MISSIONSTRING_647"), _name]) call FUNC(HQChat);
	if (!isNil "_m") then {_m setMarkerTextLocal format [(localize "STR_DOM_MISSIONSTRING_261"), GV(_mhq,GVAR(marker_text))]};
} else {
	(format [(localize "STR_DOM_MISSIONSTRING_648"), _name]) call FUNC(HQChat);
	if (!isNil "_m") then {_m setMarkerTextLocal (GV(_mhq,GVAR(marker_text)))};
};